<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>后台管理 - 开心买</title>
    <link type="text/css" rel="stylesheet" href="${project_name}/css/style.css"/>
    <script type="text/javascript" src="${project_name}/js/jquery-1.8.3.js"></script>
    <script>$(function () {
        $('.clearfix li:eq(2)').addClass('current');
    });</script>
</head>
<body>
<jsp:include page="public_header.jsp"/>
<div id="main" class="wrap">
    <c:import url="public_menu.jsp"></c:import>
    <div class="main">
        <h2>修改分类</h2>
        <div class="manage">
            <form action="${project_name}/back_type/updateFirstType" method="post">
                <fieldset>
                    <legend style="color: orange;">一级分类修改</legend>
                    <table class="form">
                        <tr>
                            <td class="field">一级分类名称：</td>
                            <td>
                                <input type="text" class="text" name="name"
                                       value="${firstType.name}${secondaryFirstType.name}"/>
                                <span class="calssName" style="color:red"></span>
                            </td>
                        </tr>
                        <tr>
                            <td><input name="id" hidden readonly value="${firstType.id}${secondaryFirstType.id}"/></td>
                            <td><label class="ui-blue"><input type="submit" name="submit" value="更新"/></label></td>
                        </tr>
                    </table>
                </fieldset>
            </form>
			<c:if test="${not empty secondaryFirstType}">
            <form action="${project_name}/back_type/updateSecondaryType" method="post">
                <fieldset>
                    <legend style="color: orange;">二级分类修改</legend>
                    <table class="form">
                        <tr>
                            <td class="field">二级分类名称：</td>
                            <td><input type="text" class="text" name="name"
                                       value="${secondaryType.name}"/>
                            </td>
                        </tr>
                        <tr>
                            <td><input name="id" hidden readonly value="${secondaryFirstType.id}"/></td>
                            <td><label class="ui-blue"><input type="submit"
                                                              name="submit" value="更新"/> </label>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </form></c:if>
        </div>
    </div>
    <div class="clear"></div>
</div>
<div id="footer">
    Copyright &copy; 2010 极客营 All Rights Reserved. 京ICP证801001号
</div>
</body>
</html>
